VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{8E27C92E-1264-101C-8A2F-040224009C02}#7.0#0"; "MSCAL.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmAddTags 
   BackColor       =   &H00FFFFFF&
   Caption         =   "FedEx Returns"
   ClientHeight    =   7575
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11235
   Icon            =   "frmAddTags.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   ScaleHeight     =   7575
   ScaleWidth      =   11235
   StartUpPosition =   1  'CenterOwner
   Begin TabDlg.SSTab SSTab1 
      Height          =   7575
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   11235
      _ExtentX        =   19817
      _ExtentY        =   13361
      _Version        =   393216
      Tabs            =   2
      Tab             =   1
      TabsPerRow      =   2
      TabHeight       =   520
      BackColor       =   -2147483644
      TabCaption(0)   =   "Sender/Recipient Info"
      TabPicture(0)   =   "frmAddTags.frx":030A
      Tab(0).ControlEnabled=   0   'False
      Tab(0).Control(0)=   "Frame2"
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "Pickup Information"
      TabPicture(1)   =   "frmAddTags.frx":0326
      Tab(1).ControlEnabled=   -1  'True
      Tab(1).Control(0)=   "Frame3(30)"
      Tab(1).Control(0).Enabled=   0   'False
      Tab(1).ControlCount=   1
      Begin VB.Frame Frame3 
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Caption         =   "Frame2"
         Height          =   7200
         Index           =   30
         Left            =   15
         TabIndex        =   65
         Top             =   315
         Width           =   11160
         Begin MSACAL.Calendar Calendar1 
            Height          =   255
            Left            =   2100
            TabIndex        =   90
            TabStop         =   0   'False
            Top             =   780
            Visible         =   0   'False
            Width           =   255
            _Version        =   524288
            _ExtentX        =   450
            _ExtentY        =   450
            _StockProps     =   1
            BackColor       =   16777215
            Year            =   2004
            Month           =   2
            Day             =   9
            DayLength       =   1
            MonthLength     =   2
            DayFontColor    =   0
            FirstDay        =   1
            GridCellEffect  =   1
            GridFontColor   =   10485760
            GridLinesColor  =   -2147483632
            ShowDateSelectors=   -1  'True
            ShowDays        =   -1  'True
            ShowHorizontalGrid=   -1  'True
            ShowTitle       =   0   'False
            ShowVerticalGrid=   -1  'True
            TitleFontColor  =   10485760
            ValueIsNull     =   -1  'True
            BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   12.01
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin VB.TextBox f1009 
            Height          =   315
            Left            =   2100
            TabIndex        =   89
            Top             =   1200
            Width           =   975
         End
         Begin VB.TextBox f1008 
            Height          =   315
            Left            =   2100
            TabIndex        =   88
            ToolTipText     =   "Must be at least 2 hours prior to Last P/U Time"
            Top             =   1560
            Width           =   975
         End
         Begin VB.ComboBox f23 
            Height          =   315
            ItemData        =   "frmAddTags.frx":0342
            Left            =   2100
            List            =   "frmAddTags.frx":034C
            TabIndex        =   87
            Top             =   2280
            Width           =   3255
         End
         Begin VB.TextBox f20 
            Height          =   315
            Left            =   2100
            TabIndex        =   86
            Top             =   2640
            Width           =   2115
         End
         Begin VB.TextBox f1010 
            Height          =   675
            Left            =   7380
            MultiLine       =   -1  'True
            TabIndex        =   85
            Top             =   1200
            Width           =   3315
         End
         Begin VB.TextBox f2210 
            Height          =   315
            Left            =   7380
            TabIndex        =   84
            Top             =   840
            Width           =   2115
         End
         Begin VB.TextBox f25 
            Height          =   315
            Left            =   7380
            TabIndex        =   83
            Top             =   480
            Width           =   3315
         End
         Begin VB.TextBox f116 
            Height          =   315
            Left            =   2100
            TabIndex        =   82
            Text            =   "1"
            Top             =   1920
            Width           =   735
         End
         Begin VB.Frame Frame1 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame1"
            Height          =   315
            Left            =   2100
            TabIndex        =   79
            Top             =   480
            Width           =   3135
            Begin VB.OptionButton optCallTag 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Call Tag"
               Height          =   255
               Left            =   0
               TabIndex        =   81
               Top             =   60
               Width           =   1155
            End
            Begin VB.OptionButton optExpressTag 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Express Tag"
               Height          =   255
               Left            =   1140
               TabIndex        =   80
               Top             =   60
               Width           =   1455
            End
         End
         Begin VB.TextBox txtDecVal 
            Height          =   315
            Left            =   7380
            TabIndex        =   78
            Top             =   4500
            Width           =   1455
         End
         Begin VB.CommandButton cmdAdd 
            Appearance      =   0  'Flat
            BackColor       =   &H00E0E0E0&
            Caption         =   "&Add To Shipment"
            Height          =   315
            Left            =   7380
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   77
            Top             =   4860
            UseMaskColor    =   -1  'True
            Width           =   1455
         End
         Begin VB.TextBox f1398 
            Height          =   675
            Left            =   2040
            MultiLine       =   -1  'True
            TabIndex        =   76
            Top             =   4500
            Width           =   3315
         End
         Begin VB.CommandButton cmdDeleteItems 
            Appearance      =   0  'Flat
            BackColor       =   &H00E0E0E0&
            Caption         =   "&Delete All"
            Height          =   315
            Left            =   4980
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   75
            Top             =   6780
            UseMaskColor    =   -1  'True
            Width           =   1215
         End
         Begin VB.CommandButton cmdClose 
            Appearance      =   0  'Flat
            BackColor       =   &H00E0E0E0&
            Caption         =   "OK"
            Height          =   315
            Left            =   6780
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   74
            Top             =   6780
            UseMaskColor    =   -1  'True
            Width           =   1215
         End
         Begin VB.CommandButton cmdCreateTag 
            Appearance      =   0  'Flat
            BackColor       =   &H00C0E0FF&
            Caption         =   "Create &Pickup"
            Height          =   315
            Left            =   3180
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   73
            Top             =   6780
            UseMaskColor    =   -1  'True
            Width           =   1215
         End
         Begin VB.ComboBox f1274 
            Height          =   315
            ItemData        =   "frmAddTags.frx":0378
            Left            =   7380
            List            =   "frmAddTags.frx":037A
            TabIndex        =   72
            Top             =   2760
            Width           =   3315
         End
         Begin VB.TextBox f1400 
            Height          =   315
            Left            =   7380
            TabIndex        =   71
            Top             =   2400
            Width           =   735
         End
         Begin VB.ComboBox f1273 
            Height          =   315
            Left            =   7380
            TabIndex        =   70
            Top             =   3120
            Width           =   3315
         End
         Begin VB.TextBox f1415 
            Height          =   315
            Left            =   7380
            TabIndex        =   69
            Top             =   3480
            Width           =   1455
         End
         Begin VB.CheckBox f1266 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Saturday Del"
            Height          =   255
            Left            =   3840
            TabIndex        =   68
            Top             =   3060
            Width           =   1455
         End
         Begin VB.CheckBox f1200 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Hold at Location"
            Height          =   255
            Left            =   2100
            TabIndex        =   67
            Top             =   3060
            Width           =   1515
         End
         Begin MSDataGridLib.DataGrid grdItems 
            Height          =   1275
            Left            =   360
            TabIndex        =   91
            TabStop         =   0   'False
            Top             =   5340
            Width           =   10335
            _ExtentX        =   18230
            _ExtentY        =   2249
            _Version        =   393216
            AllowUpdate     =   -1  'True
            HeadLines       =   1
            RowHeight       =   15
            TabAction       =   2
            AllowDelete     =   -1  'True
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   2
            BeginProperty Column00 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
         Begin VB.TextBox f1365 
            ForeColor       =   &H00000000&
            Height          =   315
            Left            =   2100
            TabIndex        =   66
            Top             =   840
            Width           =   975
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   22
            X1              =   5580
            X2              =   5580
            Y1              =   360
            Y2              =   3840
         End
         Begin VB.Label Label11 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pickup Information"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   116
            Top             =   135
            Width           =   2055
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Bill Shipment to:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   19
            Left            =   540
            TabIndex        =   115
            Top             =   2340
            Width           =   1455
         End
         Begin VB.Label lblf20 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Bill-to Account #:"
            Height          =   255
            Index           =   0
            Left            =   420
            TabIndex        =   114
            Top             =   2700
            Width           =   1575
         End
         Begin VB.Label lblTime 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Last Pickup Time:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   360
            TabIndex        =   113
            Top             =   1260
            Width           =   1635
         End
         Begin VB.Label lblTime 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pkg Ready Time:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   1
            Left            =   360
            TabIndex        =   112
            Top             =   1620
            Width           =   1635
         End
         Begin VB.Label lblTime 
            BackColor       =   &H00FFFFFF&
            Caption         =   "(HH:MM) "
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   2
            Left            =   3240
            TabIndex        =   111
            Top             =   1260
            Width           =   1095
         End
         Begin VB.Label lblTime 
            BackColor       =   &H00FFFFFF&
            Caption         =   "(HH:MM) "
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   3
            Left            =   3240
            TabIndex        =   110
            Top             =   1620
            Width           =   1095
         End
         Begin VB.Image Image2 
            Height          =   345
            Left            =   3180
            Picture         =   "frmAddTags.frx":037C
            Stretch         =   -1  'True
            Top             =   840
            Width           =   345
         End
         Begin VB.Label lblShipDate 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Dispatch Date:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   240
            TabIndex        =   109
            Top             =   900
            Width           =   1755
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pickup Instructions:"
            Height          =   255
            Index           =   3
            Left            =   5820
            TabIndex        =   108
            Top             =   1260
            Width           =   1455
         End
         Begin VB.Label lblf20 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "RMA #:"
            Height          =   255
            Index           =   1
            Left            =   5700
            TabIndex        =   107
            Top             =   900
            Width           =   1575
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Reference:"
            Height          =   255
            Index           =   11
            Left            =   5820
            TabIndex        =   106
            Top             =   540
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Number of Pkgs:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   22
            Left            =   480
            TabIndex        =   105
            Top             =   1980
            Width           =   1515
         End
         Begin VB.Label Label12 
            BackColor       =   &H00FFFFFF&
            Caption         =   "References/Instructions"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   5820
            TabIndex        =   104
            Top             =   150
            Width           =   2355
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   1
            X1              =   5820
            X2              =   10740
            Y1              =   135
            Y2              =   120
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   0
            X1              =   360
            X2              =   5340
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pickup Type:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   4
            Left            =   360
            TabIndex        =   103
            Top             =   540
            Width           =   1635
         End
         Begin VB.Label lblDecVal 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Declared Value:"
            Height          =   255
            Left            =   5700
            TabIndex        =   102
            Top             =   4560
            Width           =   1575
         End
         Begin VB.Label Label63 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Call Tag Item Information"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   0
            Left            =   360
            TabIndex        =   101
            Top             =   4155
            Width           =   2595
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   13
            X1              =   360
            X2              =   10740
            Y1              =   4140
            Y2              =   4140
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "(80 Chars Max) "
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   9
            Left            =   540
            TabIndex        =   100
            Top             =   4860
            Width           =   1455
         End
         Begin VB.Label lbl1398 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Item Description:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   540
            TabIndex        =   99
            Top             =   4560
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "(75 Chars Max) "
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   6
            Left            =   5820
            TabIndex        =   98
            Top             =   1560
            Width           =   1455
         End
         Begin VB.Label Label2 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Express Tag Service Information"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   5820
            TabIndex        =   97
            Top             =   2070
            Width           =   2895
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   2
            X1              =   5820
            X2              =   10740
            Y1              =   2055
            Y2              =   2040
         End
         Begin VB.Label lbl1400 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Shipment Weight:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   5700
            TabIndex        =   96
            Top             =   2460
            Width           =   1575
         End
         Begin VB.Label lbl1273 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Package Type:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   5820
            TabIndex        =   95
            Top             =   3180
            Width           =   1455
         End
         Begin VB.Label lbl1415 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Declared Value:"
            Height          =   255
            Left            =   5700
            TabIndex        =   94
            Top             =   3540
            Width           =   1575
         End
         Begin VB.Label lbl1274 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Service Type:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   5820
            TabIndex        =   93
            Top             =   2820
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Special Services:"
            Height          =   255
            Index           =   7
            Left            =   540
            TabIndex        =   92
            Top             =   3060
            Width           =   1455
         End
      End
      Begin VB.Frame Frame2 
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Caption         =   "Frame2"
         Height          =   7200
         Left            =   -74985
         TabIndex        =   1
         Top             =   315
         Width           =   11160
         Begin VB.TextBox f1 
            Height          =   315
            Left            =   1560
            TabIndex        =   35
            Top             =   480
            Width           =   3735
         End
         Begin VB.TextBox f11 
            Height          =   315
            Left            =   1560
            TabIndex        =   33
            Top             =   1560
            Width           =   3735
         End
         Begin VB.TextBox f12 
            BackColor       =   &H00FFFFFF&
            Height          =   315
            Left            =   1560
            TabIndex        =   31
            Top             =   1200
            Width           =   3735
         End
         Begin VB.TextBox f1365_2 
            Height          =   315
            Left            =   4980
            TabIndex        =   30
            Top             =   4560
            Width           =   975
         End
         Begin VB.ComboBox f16 
            Height          =   315
            Left            =   1560
            TabIndex        =   28
            Top             =   3000
            Width           =   2175
         End
         Begin VB.TextBox f13 
            Height          =   315
            Left            =   1560
            TabIndex        =   27
            Top             =   1920
            Width           =   3735
         End
         Begin VB.TextBox f14 
            Height          =   315
            Left            =   1560
            TabIndex        =   26
            Top             =   2280
            Width           =   3735
         End
         Begin VB.TextBox f15 
            Height          =   315
            Left            =   1560
            TabIndex        =   25
            Top             =   2640
            Width           =   3735
         End
         Begin VB.TextBox f17 
            BackColor       =   &H00FFFFFF&
            Height          =   315
            Left            =   4320
            TabIndex        =   24
            Top             =   3000
            Width           =   975
         End
         Begin VB.TextBox f18 
            Height          =   315
            Left            =   1560
            TabIndex        =   23
            Top             =   3360
            Width           =   1755
         End
         Begin VB.ComboBox cboAddrID 
            Height          =   315
            Left            =   6900
            TabIndex        =   21
            Top             =   480
            Width           =   3735
         End
         Begin VB.ComboBox f117 
            Height          =   315
            Left            =   6900
            TabIndex        =   20
            Top             =   840
            Width           =   3735
         End
         Begin VB.TextBox f6 
            Height          =   315
            Left            =   6900
            TabIndex        =   19
            Top             =   2280
            Width           =   3735
         End
         Begin VB.TextBox f7 
            Height          =   315
            Left            =   6900
            TabIndex        =   18
            Top             =   2640
            Width           =   3735
         End
         Begin VB.TextBox f5 
            Height          =   315
            Left            =   6900
            TabIndex        =   17
            Top             =   1920
            Width           =   3735
         End
         Begin VB.TextBox f4 
            Height          =   315
            Left            =   6900
            TabIndex        =   16
            Top             =   1560
            Width           =   3735
         End
         Begin VB.TextBox f32 
            Height          =   315
            Left            =   6900
            TabIndex        =   15
            Top             =   1200
            Width           =   3735
         End
         Begin VB.TextBox f183 
            Height          =   315
            Left            =   6900
            TabIndex        =   14
            Top             =   3360
            Width           =   2295
         End
         Begin VB.TextBox f9 
            Height          =   315
            Left            =   9660
            TabIndex        =   13
            Top             =   3000
            Width           =   975
         End
         Begin VB.ComboBox f8 
            Height          =   315
            Left            =   6900
            TabIndex        =   12
            Top             =   3000
            Width           =   2175
         End
         Begin VB.CheckBox f3231 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Residential Pickup"
            Height          =   255
            Left            =   1560
            TabIndex        =   11
            Top             =   3780
            Width           =   1815
         End
         Begin VB.CheckBox f440 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Residential Delivery"
            Height          =   255
            Left            =   6900
            TabIndex        =   10
            Top             =   3780
            Width           =   1995
         End
         Begin VB.ComboBox cboStatus 
            Height          =   315
            ItemData        =   "frmAddTags.frx":0686
            Left            =   1560
            List            =   "frmAddTags.frx":0693
            TabIndex        =   9
            Top             =   4920
            Width           =   1635
         End
         Begin VB.ComboBox cboType 
            Height          =   315
            ItemData        =   "frmAddTags.frx":06B1
            Left            =   1560
            List            =   "frmAddTags.frx":06BE
            TabIndex        =   8
            Top             =   4560
            Width           =   1635
         End
         Begin VB.CheckBox chkAddAddress 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Add To Address Book"
            Height          =   255
            Left            =   3480
            TabIndex        =   7
            Top             =   3420
            Value           =   1  'Checked
            Visible         =   0   'False
            Width           =   1875
         End
         Begin VB.ComboBox cboSearchField 
            Height          =   315
            ItemData        =   "frmAddTags.frx":06E0
            Left            =   7740
            List            =   "frmAddTags.frx":0702
            TabIndex        =   6
            Top             =   4560
            Width           =   1695
         End
         Begin VB.TextBox txtSearchValue 
            Height          =   315
            Left            =   7740
            TabIndex        =   5
            Top             =   4920
            Width           =   1875
         End
         Begin VB.CommandButton cmdSearch 
            Appearance      =   0  'Flat
            BackColor       =   &H00E0E0E0&
            Caption         =   "Search"
            Height          =   315
            Left            =   9720
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   4
            Top             =   4920
            UseMaskColor    =   -1  'True
            Width           =   960
         End
         Begin VB.CommandButton cmdCancelPickup 
            Appearance      =   0  'Flat
            BackColor       =   &H00C0E0FF&
            Caption         =   "Cancel &Pickup"
            Height          =   315
            Left            =   4980
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   2
            Top             =   6780
            UseMaskColor    =   -1  'True
            Width           =   1215
         End
         Begin MSACAL.Calendar Calendar2 
            Height          =   255
            Left            =   4980
            TabIndex        =   3
            TabStop         =   0   'False
            Top             =   4560
            Visible         =   0   'False
            Width           =   255
            _Version        =   524288
            _ExtentX        =   450
            _ExtentY        =   450
            _StockProps     =   1
            BackColor       =   16777215
            Year            =   2004
            Month           =   2
            Day             =   9
            DayLength       =   1
            MonthLength     =   2
            DayFontColor    =   0
            FirstDay        =   1
            GridCellEffect  =   1
            GridFontColor   =   10485760
            GridLinesColor  =   -2147483632
            ShowDateSelectors=   -1  'True
            ShowDays        =   -1  'True
            ShowHorizontalGrid=   -1  'True
            ShowTitle       =   0   'False
            ShowVerticalGrid=   -1  'True
            TitleFontColor  =   10485760
            ValueIsNull     =   -1  'True
            BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   12.01
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin MSDataGridLib.DataGrid grdTags 
            Height          =   1275
            Left            =   420
            TabIndex        =   29
            TabStop         =   0   'False
            Top             =   5340
            Width           =   10335
            _ExtentX        =   18230
            _ExtentY        =   2249
            _Version        =   393216
            AllowUpdate     =   0   'False
            HeadLines       =   1
            RowHeight       =   15
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   2
            BeginProperty Column00 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
         Begin VB.ComboBox cboCustID 
            Height          =   315
            Left            =   1560
            TabIndex        =   36
            Top             =   480
            Visible         =   0   'False
            Width           =   3735
         End
         Begin VB.ComboBox f50 
            Height          =   315
            Left            =   1560
            TabIndex        =   22
            Top             =   840
            Width           =   3735
         End
         Begin VB.ComboBox cboContact 
            Height          =   315
            Left            =   1560
            TabIndex        =   32
            Top             =   1200
            Visible         =   0   'False
            Width           =   3735
         End
         Begin VB.ComboBox cboCompany 
            Height          =   315
            Left            =   1560
            TabIndex        =   34
            Top             =   1560
            Visible         =   0   'False
            Width           =   3735
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   3
            X1              =   360
            X2              =   5340
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   4
            X1              =   5820
            X2              =   10740
            Y1              =   135
            Y2              =   120
         End
         Begin VB.Label Label3 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Return To:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   5820
            TabIndex        =   64
            Top             =   150
            Width           =   2355
         End
         Begin VB.Label Label4 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pickup From:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   63
            Top             =   135
            Width           =   2055
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   5
            X1              =   5580
            X2              =   5580
            Y1              =   360
            Y2              =   4020
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Country:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   5
            Left            =   0
            TabIndex        =   62
            Top             =   900
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Address 2:"
            Height          =   255
            Index           =   10
            Left            =   0
            TabIndex        =   61
            Top             =   2340
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Order ID:"
            Height          =   255
            Index           =   1
            Left            =   0
            TabIndex        =   60
            Top             =   540
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Contact Name:"
            Height          =   255
            Index           =   13
            Left            =   0
            TabIndex        =   59
            Top             =   1260
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Company Name:"
            Height          =   255
            Index           =   14
            Left            =   0
            TabIndex        =   58
            Top             =   1620
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Address 1:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   15
            Left            =   0
            TabIndex        =   57
            Top             =   1980
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "City:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   16
            Left            =   0
            TabIndex        =   56
            Top             =   2700
            Width           =   1455
         End
         Begin VB.Label lblState 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "State:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   55
            Top             =   3060
            Width           =   1335
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Zip:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   17
            Left            =   3840
            TabIndex        =   54
            Top             =   3060
            Width           =   375
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Phone:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   18
            Left            =   240
            TabIndex        =   53
            Top             =   3420
            Width           =   1215
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Address ID:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   235
            Left            =   5700
            TabIndex        =   52
            Top             =   540
            Width           =   1095
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Country:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   233
            Left            =   5820
            TabIndex        =   51
            Top             =   900
            Width           =   975
         End
         Begin VB.Label Label6 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Address 2:"
            Height          =   255
            Index           =   3
            Left            =   5910
            TabIndex        =   50
            Top             =   2340
            Width           =   855
         End
         Begin VB.Label Label52 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Contact:"
            Height          =   255
            Left            =   5940
            TabIndex        =   49
            Top             =   1260
            Width           =   855
         End
         Begin VB.Label Label51 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Company:"
            Height          =   255
            Left            =   5820
            TabIndex        =   48
            Top             =   1620
            Width           =   975
         End
         Begin VB.Label Label6 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Address 1:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   2
            Left            =   5760
            TabIndex        =   47
            Top             =   1980
            Width           =   1035
         End
         Begin VB.Label Label50 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "City:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   6300
            TabIndex        =   46
            Top             =   2700
            Width           =   495
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Phone:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   228
            Left            =   6180
            TabIndex        =   45
            Top             =   3420
            Width           =   615
         End
         Begin VB.Label Label48 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "State:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   6180
            TabIndex        =   44
            Top             =   3060
            Width           =   615
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Zip:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   20
            Left            =   9180
            TabIndex        =   43
            Top             =   3060
            Width           =   375
         End
         Begin VB.Label Label63 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Scheduled Pickups"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   1
            Left            =   360
            TabIndex        =   42
            Top             =   4275
            Width           =   2595
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   6
            X1              =   360
            X2              =   10740
            Y1              =   4260
            Y2              =   4260
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Status:"
            Height          =   255
            Index           =   21
            Left            =   540
            TabIndex        =   41
            Top             =   4980
            Width           =   855
         End
         Begin VB.Image Image1 
            Height          =   345
            Left            =   6060
            Picture         =   "frmAddTags.frx":0752
            Stretch         =   -1  'True
            Top             =   4560
            Width           =   345
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pickup Date:"
            Height          =   255
            Index           =   44
            Left            =   3780
            TabIndex        =   40
            Top             =   4620
            Width           =   1095
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pickup Type:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   23
            Left            =   240
            TabIndex        =   39
            Top             =   4620
            Width           =   1215
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Search:"
            Height          =   255
            Index           =   45
            Left            =   6780
            TabIndex        =   38
            Top             =   4620
            Width           =   855
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Value:"
            Height          =   255
            Index           =   46
            Left            =   6780
            TabIndex        =   37
            Top             =   4980
            Width           =   855
         End
      End
   End
End
Attribute VB_Name = "frmAddTags"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim m_rsTags As New ADODB.Recordset     'Module level recordset tied to grdTags
Dim m_rsItems As New ADODB.Recordset    'Module level recordset tied to grdItems
'---------------------------------------------------------------------------------------
' Procedure : AddItemsToMDB()
' DateTime  : 01/24/2006
' Purpose   : Adds a record to the TagsMulti database
'---------------------------------------------------------------------------------------
'
Public Sub AddItemsToMDB()
    
    On Error GoTo EH
    
    Dim strQuery As String
    Dim str1 As String
    
'    frmShip.f1.Enabled = False
'    frmShip.cboCustID.Enabled = False

    str1 = IIf(f1.Visible, f1, cboCustID)

    'Build and execute the SQL statement
    strQuery = "INSERT into TagsMulti VALUES ("
    strQuery = strQuery & SingleQuotes(str1) & ","
    strQuery = strQuery & SingleQuotes(f1398) & ","
    strQuery = strQuery & SingleQuotes(ImpliedDecimal(txtDecVal)) & ","
    strQuery = strQuery & SingleQuotes(g_strComputerName) & ")"
   
    g_connFSMSClient.Execute strQuery

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmTags:AddItemsToMDB"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : AssignFormGlobalVars()
' DateTime  : 01/24/2006
' Purpose   : Assigns values to the global variables
'---------------------------------------------------------------------------------------
'
Public Sub AssignFormGlobalVars()
    
    On Error GoTo EH
    
    g_str1 = IIf(f1.Visible, f1, cboCustID)
    If Not IsDate(f1365) Then f1365 = Date
    g_str1365 = Format(f1365, "YYYYMMDD")
    g_str1009 = RemoveSpecial(f1009) & "00"
    g_str1008 = RemoveSpecial(f1008) & "00"
    g_str116 = f116
    g_str23Return = Left(f23, 1)
    g_str20Return = f20
    g_str3231 = IIf(f3231 = 1, "Y", "")
    g_str440 = IIf(f440 = 1, "Y", "")
    g_str25 = f25
    g_str2210 = f2210
    g_str1010 = f1010
    If optExpressTag Then
        g_str1400 = ImpliedDecimal(f1400, 1)
        g_str1274 = Left(f1274, 2)
        g_str1273 = Left(f1273, 2)
        g_str1415 = ImpliedDecimal(f1415)
        g_str1200 = IIf(f1200 = 1, "Y", "")
        g_str1266 = IIf(f1266 = 1, "Y", "")
        g_strTagType = "ET"
    Else
        g_strTagType = "CT"
    End If
    
    'Return to
    g_str32Return = f32
    g_str4Return = f4
    g_str5Return = f5
    g_str6Return = f6
    g_str7Return = f7
    g_str8Return = Left(f8, 2)
    g_str9Return = f9
    g_str117Return = Left(f117, 2)
    g_str183Return = RemoveSpecial(f183)    'Return Shipper Phone
    
    'Pickup from
    g_str12 = f12
    g_str11 = f11
    g_str13 = f13
    g_str14 = f14
    g_str15 = f15
    g_str16 = Left(f16, 2)
    g_str17 = RemoveSpecial(f17)
    g_str18 = RemoveSpecial(f18)
    g_str50 = Left(f50, 2)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmTags:AssignFormGlobalVars"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboAddrID_Click()
' DateTime  : 1/30/2006
' Purpose   : Loads address fields for selected address ID.
'---------------------------------------------------------------------------------------
'
Private Sub cboAddrID_Click()
    If cboAddrID = "[Create New]" Then
        f1485 = ""
        f1486 = ""
        f1487 = ""
        f1488 = ""
        f1489 = ""
        f1490 = ""
        f1491 = ""
        f1492 = ""
    Else
        Call LoadReturnAddrForm("AddrID", cboAddrID, Me)
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboCompany_KeyPress()
' DateTime  : 1/30/2006
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboCompany_KeyPress(KeyAscii As Integer)
        
        Call SearchCombo(cboCompany, KeyAscii)

End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboCompany_LostFocus()
' DateTime  : 1/30/2006
' Purpose   : Call sub to populate recipient fields
'---------------------------------------------------------------------------------------
'
Private Sub cboCompany_LostFocus()
    
    If cboCompany <> "" Then
        If LoadAddrFields("f11", cboCompany, Me) Then
            Call AfterAddrLookup
        End If
    End If

End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboContact_KeyPress()
' DateTime  : 9/1/2004
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboContact_KeyPress(KeyAscii As Integer)
        
        Call SearchCombo(cboContact, KeyAscii)

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboContact_LostFocus()
' DateTime  : 8/31/2004
' Purpose   : Call sub to populate recipient fields
'---------------------------------------------------------------------------------------
'
Private Sub cboContact_LostFocus()
    
    If cboContact <> "" Then
        If LoadAddrFields("f12", cboContact, Me) Then
            Call AfterAddrLookup
        End If
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboCustID_Change() & cboCustID_Click
' DateTime  : 20070822-03
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboCustID_Change()
    cmdAdd.Enabled = AddButtonEnable
End Sub

Private Sub cboCustID_Click()
    cmdAdd.Enabled = AddButtonEnable
End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboCustID_KeyPress()
' DateTime  : 1/30/2006
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboCustID_KeyPress(KeyAscii As Integer)

    Call SearchCombo(cboCustID, KeyAscii)
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboCustID_LostFocus()
' DateTime  :1/30/2006
' Purpose   : Looks populates recipient fields
'---------------------------------------------------------------------------------------
'
Private Sub cboCustID_LostFocus()
    
    On Error GoTo EH
    
    If cboCustID <> "" Then
        If LoadAddrFields("CustID", cboCustID, Me) Then
            Call AfterAddrLookup
        End If
    End If
    
    Call UpdateItemsGrid

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:cboCustID_LostFocus"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : ClearItemFields()
' DateTime  : 1/30/2006
' Purpose   : Clears the multi-occurrence items fields
'---------------------------------------------------------------------------------------
'
Private Sub ClearItemFields()
    
    f1398 = ""
    txtDecVal = ""
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdAdd_Click()
' DateTime  : 1/30/2006
' Purpose   : Adds multi-occurrence items to MDB, updates grid and clears item fields
'---------------------------------------------------------------------------------------
'
Private Sub cmdAdd_Click()
    On Error GoTo EH
  
    Call AddItemsToMDB
    Call UpdateItemsGrid
    Call ClearItemFields
    f1398.SetFocus
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:cmdAdd_Click"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdCreateTag_Click()
' DateTime  : 1/31/2006
' Purpose   : Assigns global vars and sends either CT or ET transaction
'---------------------------------------------------------------------------------------
'
Private Sub cmdCreateTag_Click()
    On Error GoTo EH
    
    Call AssignFormGlobalVars
    'Save return addr
    Call SaveRegVals
    If optCallTag Then
        Call SendData(BuildTagTrans(True))
    ElseIf optExpressTag Then
        Call SendData(BuildTagTrans(False))
    End If
    
    Call SaveAltReturnAddr(cboAddrID, f32, f4, f5, f6, f7, f8, f9, Left(f117, 2), f183)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:cmdCreateTag_Click"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdClose_Click()
' DateTime  : 1/31/2006
' Purpose   : Hide form and set focus to Ship form
'---------------------------------------------------------------------------------------
'
Private Sub cmdClose_Click()
    Me.Hide
    If frmShip.Visible Then frmShip.SetFocus
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdDeleteItems_Click()
' DateTime  : 1/31/2006
' Purpose   : Verifies user wishes to delete all Call Tag items, if yes they are deleted.
'---------------------------------------------------------------------------------------
'
Private Sub cmdDeleteItems_Click()
    Dim intRet As Integer
    Dim str1 As String
    
    On Error GoTo EH
    
    str1 = IIf(f1.Visible, f1, cboCustID)
    
    intRet = MsgBox("Are you sure you wish to delete all defined Items for this Call Tag?", vbYesNo, "Confirm Delete All")
    If intRet = vbYes Then
        Call DeleteTagsMulti(str1)
        Call UpdateItemsGrid
    End If

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:cmdDeleteItems_Click"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdSearch_Click()
' DateTime  : 1/30/2006
' Purpose   : Search button on Shipping History clicked. Update grid passing search field
'             and value.
'---------------------------------------------------------------------------------------
'
Private Sub cmdSearch_Click()
    On Error GoTo EH
    
    Call UpdateTagsGrid(cboType, cboStatus, f1365_2, cboSearchField, txtSearchValue)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:cmdSearch_Click"

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f1_Change
' DateTime  : 20070822-03
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub f1_Change()
    cmdAdd.Enabled = AddButtonEnable
End Sub

'---------------------------------------------------------------------------------------
' Procedure : f1_LostFocus()
' DateTime  : 1/30/2006
' Purpose   : Get order info if Order ID field not empty.
'---------------------------------------------------------------------------------------
'
Private Sub f1_LostFocus()
    On Error GoTo EH
    
    If f1 <> "" Then
        If Not GetPickupData(f1) Then
            StatusBar1.Panels(2) = "Order " & f1 & " Not Found"
        End If
    End If
    
    Call UpdateItemsGrid
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f1_LostFocus"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1009_Change()
' DateTime  : '20070823-02 Removed code to automatically add a : in fields 1008 and 1009 on frmAddTags.
' Purpose   : Formats the Last Pickup Time field. Sets max length to 5
'---------------------------------------------------------------------------------------
'
Private Sub f1009_Change()
    On Error GoTo EH
    
    Call CheckLength(f1009, 5)

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f1009_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1008_Change()
' DateTime  : '20070823-02 Removed code to automatically add a : in fields 1008 and 1009 on frmAddTags.
' Purpose   : Formats the Pkg Ready Time field. Sets max length to 5
'---------------------------------------------------------------------------------------
'
Private Sub f1008_Change()
    On Error GoTo EH
    
    Call CheckLength(f1008, 5)

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f1008_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f117_Change()
' DateTime  : 1/30/2006
' Purpose   : Set the Country field to show entire text
'---------------------------------------------------------------------------------------
'
Private Sub f117_Change()
    On Error GoTo EH
    
    If Len(f117) >= 2 Then
        Call SetComboSelection(f117, f117)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f117_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1365_2_Change()
' DateTime  : 1/30/2006
' Purpose   : Formats Pickup Date field under Scheduled Pickups to show highlighted
'             background if date is other than today. Updates grid if changed.
'---------------------------------------------------------------------------------------
'
Private Sub f1365_2_Change()
    On Error GoTo EH

    If IsDate(f1365_2) Then
        If f1365_2 <> Date Then
            f1365_2.BackColor = &HC0E0FF
        Else
            f1365_2.BackColor = &HFFFFFF
        End If
        Call UpdateTagsGrid(cboType, cboStatus, f1365_2, cboSearchField, txtSearchValue)
    End If

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f1365_2_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1365_Change()
' DateTime  : 1/30/2006
' Purpose   : Doesn't allow P/U date prior to today and highlights background if P/U
'             is after today.
'---------------------------------------------------------------------------------------
'
Private Sub f1365_Change()
    On Error GoTo EH

    If IsDate(f1365) Then
        If DateDiff("d", Date, CDate(f1365)) > 0 Then
            f1365.BackColor = &HC0E0FF
        ElseIf DateDiff("d", Date, CDate(f1365)) < 0 Then
            f1365 = Date
            Calendar1.Today
        Else
            f1365.BackColor = &HFFFFFF
        End If
        
    End If

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f1365_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f16_Change()
' DateTime  : 1/30/2006
' Purpose   : Set state field to show entire text
'---------------------------------------------------------------------------------------
'
Private Sub f16_Change()
    On Error GoTo EH

    If Len(f16) >= 2 Then
        Call SetComboSelection(f16, f16)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f16_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f20_Change()
' DateTime  : 1/24/2006
' Purpose   : Acct# is numeric with max length of 9
'---------------------------------------------------------------------------------------
'
Private Sub f20_Change()
    On Error GoTo EH
    
    Call SetEmptyBackcolor(f20)
    Call NumericOnly(f20, False)
    Call CheckLength(f20, 9)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f20_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f20_LostFocus()
' DateTime  : 1/24/2006
' Purpose   : Validate Billing acct# and give error if not valid. If blank, set acct#
'             back to Bill Shipper and set focus on Billing Type field.
'---------------------------------------------------------------------------------------
'
Private Sub f20_LostFocus()
    On Error GoTo EH
    
    If Not AcctNumCheckOK(f20) Then
        f20.BackColor = &HC0E0FF
        If f20 <> "" Then
            MsgBox "Invalid FedEx Account Number", vbExclamation, "Ship Error"
            f20.SetFocus
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f20_LostFocus"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f23_Change()
' DateTime  : 1/24/2006
' Purpose   : Calls a routine to populate the entire text of selected payment type.
'---------------------------------------------------------------------------------------
'
Private Sub f23_Change()
    If Len(f23) >= 1 Then
        Call SetComboSelection(f23, f23)
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : f23_Click()
' DateTime  : 1/24/2006
' Purpose   : Billing Type 3 is selected highlight Billing Acct# field, and
'             set focus to it, else disable acct# field.
'---------------------------------------------------------------------------------------
'
Private Sub f23_Click()
    On Error GoTo EH
    
    If Left(f23, 1) = "3" Then
        f20.Enabled = True
        If Len(f20) = 0 Then
            f20.BackColor = &HC0E0FF
            f20.SetFocus
        End If
    Else
        f20.Enabled = False
        f20 = ""
        f20.BackColor = &HFFFFFF
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f23_Click"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1273_Change()
' DateTime  : 1/26/2006
' Purpose   : Calls a routine to populate the entire text of selected pkg type.
'---------------------------------------------------------------------------------------
'
Private Sub f1273_Change()
    
    If Len(f1273) >= 2 Then
        Call SetComboSelection(f1273, f1273)
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1274_Change()
' DateTime  : 1/26/2006
' Purpose   : Service type field - if length is greater than 2 then enable Email button
'             and call ShowSpecialSvcs.
'---------------------------------------------------------------------------------------
'
Private Sub f1274_Change()
    On Error GoTo EH
    
    If Len(f1274) >= 2 Then
        Call SetComboSelection(f1274, f1274)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f1274_Change"

End Sub

Private Sub f3231_Click()
    Call EnableDisableTimeFields
End Sub

'---------------------------------------------------------------------------------------
' Procedure : f50_Change()
' DateTime  : 1/30/2006
' Purpose   : After Country is at least 2 characters call routines to set populate
'             the selection text.
'---------------------------------------------------------------------------------------
'
Private Sub f50_Change()
    On Error GoTo EH
    
    If Len(f50) >= 2 Then
        Call SetComboSelection(f50, f50)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:f50_Change"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f8_Change()
' DateTime  : 1/30/2006
' Purpose   : Call SetComboSelection to show full state text
'---------------------------------------------------------------------------------------
'
Private Sub f8_Change()
    If Len(f8) = 2 Then
        Call SetComboSelection(f8, f8)
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_Activate()
' DateTime  : 1/24/2006
' Purpose   : Update information on the Form when it gets focus.
'---------------------------------------------------------------------------------------
'
Private Sub Form_Activate()
    
    On Error GoTo EH
    
'    frmShip.f1.Enabled = False
'    frmShip.cboCustID.Enabled = False
    
    'Set the lookup type to match Ship form.
    Call SetLookup(IIf(frmShip.f1.Visible, True, False), Me)
    
    'Get saved values
    Call GetRegVals
    
    'If Pickup from fields are blank get values from Ship screen
    With frmShip
        If f1.Visible Then
            f1 = IIf(f1 = "", .f1, f1)
            f12 = IIf(f12 = "", .f12, f12)
            f11 = IIf(f11 = "", .f11, f11)
        Else
            cboCustID = IIf(cboCustID = "", .cboCustID, cboCustID)
            cboCompany = IIf(cboCompany = "", .cboCompany, cboCompany)
            cboContact = IIf(cboContact = "", .cboContact, cboContact)
        End If
        f50 = IIf(f50 = "", .f50, f50)
        f13 = IIf(f13 = "", .f13, f13)
        f14 = IIf(f14 = "", .f14, f14)
        f15 = IIf(f15 = "", .f15, f15)
        f16 = IIf(f16 = "", .f16, f16)
        f17 = IIf(f17 = "", .f17, f17)
        f18 = IIf(f18 = "", .f18, f18)
    End With
    
    'Load Addr ID if not blank, else get address from Server tab on Setup form
    If cboAddrID <> "" Then
        
        Call LoadReturnAddrForm("AddrID", cboAddrID, Me)

    Else
        With frmSetup
            f117 = IIf(f117 = "", .f117, f117)
            f32 = IIf(f32 = "", .f32, f32)
            f4 = IIf(f4 = "", .f4, f4)
            f5 = IIf(f5 = "", .f5, f5)
            f7 = IIf(f7 = "", .f7, f7)
            f8 = IIf(f8 = "", .f8, f8)
            f9 = IIf(f9 = "", .f9, f9)
            f183 = IIf(f183 = "", .f183, f183)
        End With
    End If
    
    Call UpdateTagsGrid(cboType, cboStatus, f1365_2, cboSearchField, txtSearchValue)
    Call UpdateItemsGrid
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:Form_Activate"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_KeyDown()
' DateTime  : 1/26/2006
' Purpose   : Enter key pressed sends a TAB to move to next field
'---------------------------------------------------------------------------------------
'
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If Not TypeOf Me.ActiveControl Is CommandButton Then
        If Shift = 0 And KeyCode = 13 Then
            SendKeys "{TAB}"
        End If
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_KeyUp()
' DateTime  : 1/26/2006
' Purpose   : Captures CTRL-A to toggle lookup
'---------------------------------------------------------------------------------------
'
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    On Error GoTo EH
    
    Dim i As Integer
    If Shift = 2 Then
        Select Case KeyCode
            'CTRL-A - Toggles Address Book and interactive processing
            Case 65
                If f1.Visible Then
                    Call SetLookup(False, Me)
                ElseIf cboCustID.Visible Then
                    Call SetLookup(True, Me)
                End If
        End Select
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:Form_KeyUp"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_Load()
' DateTime  : 1/26/2006
' Purpose   : Set initial values when form loads
'---------------------------------------------------------------------------------------
'
Private Sub Form_Load()
    
    On Error GoTo EH
    
    'Load Express Tag Svcs
    f1274.AddItem "01 - FedEx Priority Overnight"
    f1274.AddItem "05 - FedEx Standard Overnight"
    f1274.AddItem "03 - FedEx 2Day"
    f1274.AddItem "06 - FedEx First Overnight"
    ' 2011-05-06, JFW, New Domestic Economy
    If g_str117 = "US" Then
        f1274.AddItem "20 - FedEx Express Saver"
    ElseIf g_str117 = "CA" Then
        f1274.AddItem "20 - FedEx Economy"
    End If
    
    'Load Express Tag Pkging
    f1273.AddItem "01 - Your Packaging"
    f1273.AddItem "02 - FedEx Pak"
    f1273.AddItem "03 - FedEx Box"
    f1273.AddItem "04 - FedEx Tube"
    f1273.AddItem "06 - FedEx Envelope"
    
    'Set Pickup Date Calendars size and Date
    Calendar1.Height = 2295
    Calendar1.Width = 3015
    Calendar1.Today

    Calendar2.Height = 2295
    Calendar2.Width = 3015
    Calendar2.Today

    f1365 = Date
    f23 = "1"
    f1365_2 = Date
    cboType = "All"
    cboStatus = "Scheduled"

    Call LoadCountries(f50)
    Call LoadCountries(f117)
    Call LoadStates(f16)
    Call LoadStates(f8)
    Call LoadAddrIDCombo(cboAddrID, cboAddrID)
    Call LoadAddrLookupCombos(cboCustID, cboCustID, "CustID")
    Call LoadAddrLookupCombos(cboContact, cboContact, "f12")
    Call LoadAddrLookupCombos(cboCompany, cboCompany, "f11")
    
    If Left(frmShip.f1274, 2) <> "92" And Left(frmShip.f1274, 2) <> "90" Then
        optExpressTag = True
    Else
        optCallTag = True
    End If
    
    SSTab1.Tab = 0
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:Form_Load"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_Unload()
' DateTime  : 1/26/2006
' Purpose   : Closes module level recordsets and sets them to nothing.
'---------------------------------------------------------------------------------------
'
Private Sub Form_Unload(Cancel As Integer)
    On Error GoTo EH
        
    If m_rsTags.State = adStateOpen Then m_rsTags.Close
    Set m_rsTags = Nothing
    If m_rsItems.State = adStateOpen Then m_rsItems.Close
    Set m_rsItems = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:Form_Unload"

End Sub
'---------------------------------------------------------------------------------------
' Module    : Image2_Click()
' DateTime  : 1/30/2006
' Author    : Chris Elwell
' Purpose   : Show the Pickup Date calendar under Pickup Information
'---------------------------------------------------------------------------------------
'
Private Sub Image2_Click()
    Calendar1.Visible = True
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Calendar1_Click()
' DateTime  : 1/30/2006
' Purpose   : Puts date selected on calendar in Pickup Date field.
'---------------------------------------------------------------------------------------
'
Private Sub Calendar1_DblClick()
    f1365.Text = Calendar1.Value
    Calendar1.Visible = False
End Sub
'---------------------------------------------------------------------------------------
' Procedure : optCallTag_Click()
' DateTime  : 1/30/2006
' Purpose   : Enable Call Tags fields
'---------------------------------------------------------------------------------------
'
Private Sub optCallTag_Click()
    Call EnableDisableTagFields(True)
    Call EnableDisableTimeFields
    Call UpdateItemsGrid
End Sub
'---------------------------------------------------------------------------------------
' Procedure : optExpressTag_Click()
' DateTime  : 1/30/2006
' Purpose   : Enable Express Tags fields
'---------------------------------------------------------------------------------------
'
Private Sub optExpressTag_Click()
    Call EnableDisableTagFields(False)
    Call EnableDisableTimeFields
    Call UpdateItemsGrid
End Sub
'---------------------------------------------------------------------------------------
' Procedure : EnableDisableTagFields()
' DateTime  : 01/24/2006
' Purpose   : Enables/disables Call Tag and Express Tag fields
'---------------------------------------------------------------------------------------
'
Private Sub EnableDisableTagFields(ByVal blnCallTag As Boolean)
    
    'Ground Call Tag fields
    lbl1398.Enabled = blnCallTag
    f1398.Enabled = blnCallTag
    txtDecVal.Enabled = blnCallTag
    ' 2011-12-22, JFW, Only some countries require
    ' lblDecVal.Enabled = blnCallTag
    grdItems.Enabled = blnCallTag
    cmdDeleteItems.Enabled = blnCallTag
    
    'Express Tag fields
    f1400.Enabled = Not blnCallTag
    lbl1400.Enabled = Not blnCallTag
    f1274.Enabled = Not blnCallTag
    lbl1274.Enabled = Not blnCallTag
    f1273.Enabled = Not blnCallTag
    lbl1273.Enabled = Not blnCallTag
    f1415.Enabled = Not blnCallTag
    lbl1415.Enabled = Not blnCallTag
    f1200.Enabled = Not blnCallTag
    f1266.Enabled = Not blnCallTag
    
    '20070822-03 Add code to enable/disable Add to Shipment button on frmAddTags.
    cmdAdd.Enabled = AddButtonEnable
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : DeleteTagsMulti()
' DateTime  : '20070823-01 Added code to support saving Call Tag items by Order ID or Cust ID.
' Author    : Chris Elwell
' Purpose   : Deletes records for an Order ID in the LTLMulti table.
'---------------------------------------------------------------------------------------
'
Public Sub DeleteTagsMulti(ByVal str1 As String)
    
    On Error GoTo EH
    
    Dim strQuery As String
    
    strQuery = "DELETE FROM TagsMulti WHERE f1 = '" & str1 & _
                "' And Workstation = '" & g_strComputerName & "'"
    
    g_connFSMSClient.Execute strQuery
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:DeleteTagsMulti"

End Sub
'---------------------------------------------------------------------------------------
' Procedure : grdItems_BeforeDelete()
' DateTime  : 1/24/2005
' Purpose   : Verify user wishes to delete a record in the Call Tag grid.
'---------------------------------------------------------------------------------------
'
Private Sub grdItems_BeforeDelete(Cancel As Integer)
    Dim intResult As Integer
    
    intResult = MsgBox("Are you sure that you want to delete selected record?", vbYesNo, "Delete Confirmation")
   
    If intResult = vbNo Then
        Cancel = True
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : UpdateItemsGrid()
' DateTime  : '20070823-01 Added code to support saving Call Tag items by Order ID or Cust ID.
' Purpose   : Update the datagrid for given OrderID. Also assign column captions.
' Call from : Form_Activate, cmdAddMPS_Click, frmShip.f1_LostFocus,
'             cmdDeleteItems_Click,
'---------------------------------------------------------------------------------------
'
Public Sub UpdateItemsGrid()
    
    On Error GoTo EH
    
    Dim strQuery As String
    Dim str1 As String
    
    str1 = IIf(f1.Visible, f1, cboCustID)
    
    If optExpressTag Then str1 = ""
    
    'Build and open the recordset
    strQuery = "SELECT * FROM TagsMulti WHERE f1 = '" & str1 & _
            "' And Workstation = '" & g_strComputerName & "'"
    
    If m_rsItems.State = adStateOpen Then m_rsItems.Close
    
    m_rsItems.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic

    Set grdItems.DataSource = m_rsItems
    With grdItems
        .ClearFields
        .ReBind
        .Columns(0).Caption = "Order ID"
        .Columns(1).Caption = "Item Description"
        .Columns(2).Caption = "Dec Val"
        .Columns(3).Visible = False
    End With
    
    Exit Sub
    
EH:
    'Added to ignore "Operation not allowed in this context" error
    If Err.number <> 3219 Then
        MsgBox Err.Description, vbCritical, "frmTags:UpdateItemsGrid"
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Calendar1_DblClick()
' DateTime  : 1/26/2006
' Purpose   : Puts date selected on calendar in Pickup date field and updates the Tags Grid.
'---------------------------------------------------------------------------------------
'
Private Sub Calendar2_DblClick()
    
    f1365_2.Text = Calendar2.Value
    Calendar2.Visible = False
    Call UpdateTagsGrid(cboType, cboStatus, f1365_2, cboSearchField, txtSearchValue)

End Sub
'---------------------------------------------------------------------------------------
' Procedure : UpdateTagsGrid()
' DateTime  : 10/25/2004
' Purpose   : Update the IPD grid and set column headings
' Call from : Form_Activate, cmdDelete_Click
'---------------------------------------------------------------------------------------
'
Public Sub UpdateTagsGrid(ByVal strTagsType As String, ByVal strStatus As String, ByVal strPickupDate As String, _
                        Optional ByVal strField As String, Optional ByVal strValue As String, _
                        Optional ByVal strSortField As String, Optional ByVal strDirection As String)
    
    Dim strQuery As String
    
    On Error GoTo EH
    
    'Build query
    strQuery = "SELECT f1011, f29, f2210, f25, f11, f12, f13, f15, f16, f17, Type, Status FROM Tags WHERE f10 = " & SingleQuotes(g_str10)
    strQuery = strQuery & " AND f1365 = " & SingleQuotes(Format(strPickupDate, "YYYYMMDD"))
    
    'Add Type
    Select Case strTagsType
        Case "Call Tags"
            strQuery = strQuery & " And Type = 'CT'"
        Case "Express Tags"
            strQuery = strQuery & " And Type = 'ET'"
    End Select
    
    'Add Status
    Select Case strStatus
        Case "Scheduled"
            strQuery = strQuery & " And Status = 'Scheduled'"
        Case "Canceled"
            strQuery = strQuery & " And Status = 'Canceled'"
    End Select
    
    'Convert strField to actual field name in Shipments table of FSMSClient.mdb
    If strField <> "" Then
        strField = GridCaptionToFieldName(strField)
        strQuery = strQuery & " And " & strField & " = " & SingleQuotes(strValue)
    End If
    'If Sort field is blank set to tracking number else convert to fieldname
    If strSortField = "" Then
        strSortField = "f1011"
    Else
        strSortField = GridCaptionToFieldName(strSortField)
    End If
    
    'If Sort direction is blank set to DESC
    If strDirection = "" Then
        strDirection = "DESC"
    End If
        
    strQuery = strQuery & " ORDER BY " & strSortField & " " & strDirection
    
    'If already open, close recordset
    If m_rsTags.State = adStateOpen Then m_rsTags.Close
    'Execute query
    m_rsTags.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic

    
    Set grdTags.DataSource = m_rsTags
    
    With grdTags
        .ClearFields
        .ReBind
        .Columns(0).Caption = "Pickup #"
        .Columns(1).Caption = "Trk #"
        .Columns(2).Caption = "RMA #"
        .Columns(3).Caption = "References"
        .Columns(4).Caption = "Company"
        .Columns(5).Caption = "Contact"
        .Columns(6).Caption = "Addr1"
        .Columns(7).Caption = "City"
        .Columns(8).Caption = "St"
        .Columns(9).Caption = "Zip"
        .Columns(10).Caption = "Type"
        .Columns(11).Caption = "Status"
    End With
    
    Call SetCancelPickupButton
    
Release:
    Set m_rsTags = Nothing
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, "frmAddTags:UpdateTagsGrid"
    Resume Release
     
End Sub
'---------------------------------------------------------------------------------------
' Module    : SetCancelPickupButton
' DateTime  : 1/26/2006
' Author    : Chris Elwell
' Purpose   : Enable/disable Cancel Pickup Button
'---------------------------------------------------------------------------------------
'
Public Sub SetCancelPickupButton()
    On Error GoTo EH
    
    'Only enable buttons if one row selected, cmdCreateTag is enable (Winsock connected), Status is "Scheduled"
    'and the pickup date was not prior to today.
    With grdTags
        If .SelBookmarks.Count <> 1 Or cmdCreateTag.Enabled = False Or _
            .Columns("Status") <> "Scheduled" Or DateDiff("d", Date, CDate(f1365)) < 0 Then
            
            cmdCancelPickup.Enabled = False
        Else
            cmdCancelPickup.Enabled = True
        End If
    End With
    
    Exit Sub
EH:
    'Do nothing

End Sub
'---------------------------------------------------------------------------------------
' Module    : grdTags_Click
' DateTime  : 1/26/2006
' Author    : Chris Elwell
' Purpose   : Enable/disable Cancel Pickup Button
'---------------------------------------------------------------------------------------
'
Private Sub grdTags_Click()
    Call SetCancelPickupButton
End Sub
'---------------------------------------------------------------------------------------
' Module    : Image1_Click()
' DateTime  : 1/26/2006
' Author    : Chris Elwell
' Purpose   : Show the Pickup date calendar under Scheduled Pickups
'---------------------------------------------------------------------------------------
'
Private Sub Image1_Click()
    Calendar2.Visible = True
End Sub
'---------------------------------------------------------------------------------------
' Module    : cboStatus_Click()
' DateTime  : 1/26/2006
' Author    : Chris Elwell
' Purpose   : P/U Status changed, update Tags grid
'---------------------------------------------------------------------------------------
'
Private Sub cboStatus_Click()
    Call UpdateTagsGrid(cboType, cboStatus, f1365_2, cboSearchField, txtSearchValue)
End Sub
'---------------------------------------------------------------------------------------
' Module    : cboType_Click()
' DateTime  : 1/26/2006
' Author    : Chris Elwell
' Purpose   : P/U Type changed, update Tags grid
'---------------------------------------------------------------------------------------
'
Private Sub cboType_Click()
    Call UpdateTagsGrid(cboType, cboStatus, f1365_2, cboSearchField, txtSearchValue)
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdCancelPickup_Click()
' DateTime  : 1/26/2006
' Purpose   : Send transaction to Cancel Pickup
'---------------------------------------------------------------------------------------
'
Private Sub cmdCancelPickup_Click()
    
    g_strTagType = IIf(grdTags.Columns("Type") = "CT", "CT", "ET")
    'Use this global since g_str29 gets cleared in ParseComplete.
    g_str1010 = grdTags.Columns("Trk #")
    Call SendData(BuildCancelTagTrans(grdTags.Columns("Pickup #"), g_str1010))
    Call SetCancelPickupButton
    Call UpdateTagsGrid(cboType, cboStatus, f1365_2, cboSearchField, txtSearchValue)

End Sub
'---------------------------------------------------------------------------------------
' Module    : GridCaptionToFieldName
' DateTime  : 1/30/2006
' Author    : Chris Elwell
' Purpose   : Converts Tags grid captions to database field names.
'---------------------------------------------------------------------------------------
'
Private Function GridCaptionToFieldName(ByVal strField As String) As String
    
    Select Case Trim(strField)
        Case "Pickup #"
            GridCaptionToFieldName = "f1011"
        Case "Trk #"
            GridCaptionToFieldName = "f29"
        Case "RMA #"
            GridCaptionToFieldName = "f2210"
        Case "References"
            GridCaptionToFieldName = "f25"
        Case "Company"
            GridCaptionToFieldName = "f11"
        Case "Contact"
            GridCaptionToFieldName = "f12"
        Case "Addr1"
            GridCaptionToFieldName = "f13"
        Case "City"
            GridCaptionToFieldName = "f15"
        Case "St"
            GridCaptionToFieldName = "f16"
        Case "Zip"
            GridCaptionToFieldName = "f17"
    End Select

End Function
'---------------------------------------------------------------------------------------
' Module    : ClearTagFields
' DateTime  : 1/31/2006
' Author    : Chris Elwell
' Purpose   : Clears the fields used in creating a pickup request
'---------------------------------------------------------------------------------------
'
Public Sub ClearTagFields()

    If f1.Visible Then f1 = ""
    If cboCustID.Visible Then cboCustID = ""
    If f12.Visible Then f12 = ""
    If cboCompany.Visible Then cboCompany = ""
    If f11.Visible Then f11 = ""
    If cboContact.Visible Then cboContact = ""
    f13 = ""
    f14 = ""
    f15 = ""
    f16 = ""
    f17 = ""
    f18 = ""
    f3231 = 0
    f1009 = ""
    f1008 = ""
    f1200 = 0
    f1266 = 0
    f25 = ""
    f2210 = ""
    f1010 = ""
    f1400 = ""
    f1415 = ""
    f116 = ""
    f23 = "1"
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : ClearSearchFields
' DateTime  : 1/31/2006
' Author    : Chris Elwell
' Purpose   : Clears the search fields under Scheduled Pickups
'---------------------------------------------------------------------------------------
'
Public Sub ClearSearchFields()
    
    cboSearchField = ""
    txtSearchValue = ""

End Sub
'---------------------------------------------------------------------------------------
' Module    : SaveRegVals
' DateTime  : 2/2/2006
' Author    : Chris Elwell
' Purpose   : Saves Reg Values
'---------------------------------------------------------------------------------------
'
Private Sub SaveRegVals()
    
    'Save setting to registry
    With g_clsReg
        'Addr ID
        .SetRegistryValue "TagReturnAddrID", cboAddrID, REG_SZ
        If optExpressTag Then
            .SetRegistryValue "TagReturnSvc", Left(f1274, 2), REG_SZ
            .SetRegistryValue "TagReturnPkg", Left(f1273, 2), REG_SZ
        End If
        .SetRegistryValue "TagBillTo", Left(f23, 1), REG_SZ
        .SetRegistryValue "TagBillToAcct", f20, REG_SZ
        .SetRegistryValue "TagReturnRes", f440, REG_SZ
    End With

End Sub
'---------------------------------------------------------------------------------------
' Module    : GetRegVals
' DateTime  : 2/2/2006
' Author    : Chris Elwell
' Purpose   : Gets Reg Values
'---------------------------------------------------------------------------------------
'
Private Sub GetRegVals()
    
     With g_clsReg
        .hkey = HKEYTYPE
        .KeyRoot = MAINKEYROOT
        .Subkey = MAINSUBKEY
        cboAddrID = .GetRegistryValue("TagReturnAddrID", "")
        f1274 = .GetRegistryValue("TagReturnSvc", "01")
        f1273 = .GetRegistryValue("TagReturnPkg", "01")
        f23 = .GetRegistryValue("TagBillTo", "1")
        f20 = IIf(Left(f23, 1) = "1", "", .GetRegistryValue("TagBillToAcct", ""))
        f440 = .GetRegistryValue("TagReturnRes", 0)
    End With
   
End Sub
'---------------------------------------------------------------------------------------
' Module    : EnableDisableTimeFields
' DateTime  : 2/2/2006
' Author    : Chris Elwell
' Purpose   : Disables time fields and labels if Call Tag and Res P/U.
'---------------------------------------------------------------------------------------
'
Private Sub EnableDisableTimeFields()
    Dim i As Integer
    
    For i = 0 To lblTime.UBound
        lblTime(i).Enabled = IIf(optCallTag And f3231 = 1, False, True)
    Next
    f1009.Enabled = IIf(optCallTag And f3231 = 1, False, True)
    f1008.Enabled = IIf(optCallTag And f3231 = 1, False, True)
    f1009 = IIf(optCallTag And f3231 = 1, "", f1009)
    f1008 = IIf(optCallTag And f3231 = 1, "", f1008)
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : AddButtonEnable
' DateTime  : 20070822-03
' Purpose   : Return boolean if either the Order ID or Cust ID is populated
'---------------------------------------------------------------------------------------
'
Private Function AddButtonEnable() As Boolean

    If ((f1.Visible = True And f1 <> "") Or (cboCustID.Visible = True And cboCustID <> "")) _
        And optCallTag = True Then
       
            AddButtonEnable = True
    
    Else
            
            AddButtonEnable = False
    
    End If

End Function
'---------------------------------------------------------------------------------------
' Module    : GotFocus - textboxes
' DateTime  : 8/29/2005
' Author    : Chris Elwell
' Purpose   : The subroutines below call a routine to select all text in the text box
'             passed to the sub.
'---------------------------------------------------------------------------------------
'
'P/U date Tab 0
Private Sub f1365_GotFocus()
    Call SelectAllText(f1365)
End Sub
'Last P/U time
Private Sub f1009_GotFocus()
    Call SelectAllText(f1009)
End Sub
'Pkg Ready time
Private Sub f1008_GotFocus()
    Call SelectAllText(f1008)
End Sub
'PO Number
Private Sub f116_GotFocus()
    Call SelectAllText(f116)
End Sub
'Bill-to Acct#
Private Sub f20_GotFocus()
    Call SelectAllText(f20)
End Sub
'References
Private Sub f25_GotFocus()
    Call SelectAllText(f25)
End Sub
'RMA #
Private Sub f2210_GotFocus()
    Call SelectAllText(f2210)
End Sub
'P/U Instructions
Private Sub f1010_GotFocus()
    Call SelectAllText(f1010)
End Sub
'Wgt
Private Sub f1400_GotFocus()
    Call SelectAllText(f1400)
End Sub
'Declared Value
Private Sub f1415_GotFocus()
    Call SelectAllText(f1415)
End Sub
'Item Description
Private Sub f1398_GotFocus()
    Call SelectAllText(f1398)
End Sub
'Declared Value
Private Sub txtDecVal_GotFocus()
    Call SelectAllText(txtDecVal)
End Sub
'Order ID
Private Sub f1_GotFocus()
    Call SelectAllText(f1)
End Sub
'Contact Name
Private Sub f12_GotFocus()
    Call SelectAllText(f12)
End Sub
'Company Name
Private Sub f11_GotFocus()
    Call SelectAllText(f11)
End Sub
'Address 1
Private Sub f13_GotFocus()
    Call SelectAllText(f13)
End Sub
'Address 2
Private Sub f14_GotFocus()
    Call SelectAllText(f14)
End Sub
'City
Private Sub f15_GotFocus()
    Call SelectAllText(f15)
End Sub
'Zip
Private Sub f17_GotFocus()
    Call SelectAllText(f17)
End Sub
'Phone
Private Sub f18_GotFocus()
    Call SelectAllText(f18)
End Sub
'Return To Contact
Private Sub f32_GotFocus()
    Call SelectAllText(f32)
End Sub
'Return To Company
Private Sub f4_GotFocus()
    Call SelectAllText(f4)
End Sub
'Return To Addr1
Private Sub f5_GotFocus()
    Call SelectAllText(f5)
End Sub
'Return To Addr2
Private Sub f6_GotFocus()
    Call SelectAllText(f6)
End Sub
'Return To City
Private Sub f7_GotFocus()
    Call SelectAllText(f7)
End Sub
'Return To Zip
Private Sub f9_GotFocus()
    Call SelectAllText(f9)
End Sub
'Return To Phone
Private Sub f183_GotFocus()
    Call SelectAllText(f183)
End Sub
'P/U date Tab 1
Private Sub f1365_2_GotFocus()
    Call SelectAllText(f1365_2)
End Sub
'Search Value
Private Sub txtSearchValue_GotFocus()
    Call SelectAllText(txtSearchValue)
End Sub

